package com.qf.feign;

import com.qf.entity.Hotal;
import com.qf.entity.R;
import com.qf.entity.Room;
import com.qf.entity.RoomPrice;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("MICRO-SEARCH")
public interface SearchFeign {

    @RequestMapping("/search/insertHotal")
    public R<Boolean> syncHotal(@RequestBody Hotal hotal);

    @RequestMapping("/search/insertRoom")
    public R<Boolean> syncHotalRoom(@RequestBody Room room);

    @RequestMapping("/search/insertRoomPirces")
    public R<Boolean> syncHotalRoomPrices(@RequestParam Integer hid, @RequestBody List<RoomPrice> priceList);

    @RequestMapping("/search/updateRoomPrice")
    public R<Boolean> updateHotalRoomPrice(@RequestParam Integer hid, @RequestBody RoomPrice price);
}
